using System;
using System.Collections.Generic;
using System.Text;

namespace Microsoft.ConnectionEngine.Common
{
    public class MessageTypeHandler
    {
        private int messageType;

        /// <summary>
        /// Represents the Message Type being handled.
        /// </summary>
        public int MessageType
        {
            get { return messageType; }
            set { messageType = value; }
        }


        private string assemblyName;

        /// <summary>
        /// Represents the assembly that handles the Message Type
        /// </summary>
        public string AssemblyName
        {
            get { return assemblyName; }
            set { assemblyName = value; }
        }


        private string className;

        /// <summary>
        /// Represents the class within the assembly that handles the Message Type.
        /// </summary>
        public string ClassName
        {
            get { return className; }
            set { className = value; }
        }

        private string methodName;

        /// <summary>
        /// Represents the method within the class that handles the Message Type.
        /// </summary>
        public string MethodName
        {
            get { return methodName; }
            set { methodName = value; }
        }

        /// <summary>
        /// Instantiates a new MessageTypeHandler object.
        /// </summary>
        public MessageTypeHandler()
        {
            MessageType = int.MinValue;
            AssemblyName = string.Empty;
            ClassName = string.Empty;
            MethodName = string.Empty;
        }

        /// <summary>
        /// Instantiates a new MessageTypeHandler object based on the arguments passed as parameters.
        /// </summary>
        /// <param name="msgtype">The Message Type being handled.</param>
        /// <param name="assemblyname">The assembly that handles the Message Type.</param>
        /// <param name="classname">The class within the assembly that handles the Message Type.</param>
        /// <param name="methodname">The method within the class that handles the Message Type.</param>
        public MessageTypeHandler(int msgtype, string assemblyname, string classname, string methodname)
        {
            MessageType = msgtype;
            AssemblyName = assemblyname;
            ClassName = classname;
            MethodName = methodname;
        }

    }
}
